package com.hoas.quickstart.threads.chapter05.chapter05_1_2;

import java.util.Calendar;
import java.util.Date;
import java.util.Timer;

public class Test6 {

    public static void main(String[] args) throws InterruptedException {
        int i = 0;

        Calendar calendarRef = Calendar.getInstance();
        Date runDate = calendarRef.getTime();
        while (true) {
            i++;
            Timer timer = new Timer();
            MyTaskD d = new MyTaskD(i);
            timer.schedule(d, runDate);
            timer.cancel();

        }
    }

}
